package vip.websky.project.core.eventbus;

import com.google.common.eventbus.EventBus;

/**
 * EventBus 监听
 *
 * @author: YangYong
 * @createAt: 2017/8/9-09:35
 */
public class CommonEventBus {

    private final static EventBus eventBus = new EventBus();

    public static EventBus getInstance(){
        return eventBus;
    }

    public static void post(CommonEvent event){
        eventBus.post(event);
    }
    //注册 监听事件
    public static void register(CommonEventListener listener){
        eventBus.register(listener);
    }
    public static void unregister(CommonEventListener listener){
        eventBus.unregister(listener);
    }

}
